from django.conf.urls import url

from . import views
from . import wchat_mini

urlpatterns = [
    url(r'^$', views.index, name='index'),  # 微信签名验证
    url(r'^login$', views.login, name='login'),  # 微信登录
    url(r'^ggcard-login$', views.loginGGcard, name='loginGGcard'),  # 微信登录
    # url(r'^/(\w+.txt)$', views.wx_file, name='wx_file'),  # 微信文件

    url(r'^(?P<file_name>\w+.txt)$', views.wx_file, name='wx_file'),  # 微信文件
    url(r'^share$', views.share, name='share'),  # 微信分享
    # url(r'^test$', views.test, name='test'),  # 测试
    url(r'^c2c_share$', views.c2c_share, name='c2c_share'),  # 组建团队
    url(r'^share_test$', views.share_test, name='share_test'),  # 测试分享
    url(r'^pay$', views.pay, name='pay'),  # pay
    url(r'^pay_page_h5$', views.pay_page_h5, name='pay_page_h5'),  # h5 支付页面
    url(r'^pay_page/$', views.pay_page, name='pay_page'),  # pay
    url(r'^pay_notice$', views.pay_notice, name='pay_notice'),  # 支付通知
    url(r'^pay_test_notice$', views.pay_test_notice, name='pay_test_notice'),  # 测试通知，直接返回ok
    url(r'^get_scan_code_link$', views.get_scan_code_link, name='get_scan_code_link'),  # 获取微信扫码关注二维码连接

    # 小程序
    url(r'^wx-mini-login$', wchat_mini.WXLoginRegisterViewSet.as_view(), name='miniLogin'),  # 微信小程序登录
    url(r'^encrypt-tel$', wchat_mini.EncryptedTelViewSet.as_view(), name='encryptedTel'),  # 解密手机号
    url(r'^noticePay$', wchat_mini.we_chat_notify, name='we_chat_notify'),  # 支付结果通知
    url(r'^wxaCode$', wchat_mini.WxaCodApiViewSet.as_view(), name='WxaCodApiViewSet'),  # 小程序码
]
